package com.gulimall.product.feign;

import com.gulimall.common.to.SkuFullReductionTo;
import com.gulimall.common.to.SkuLadderTo;
import com.gulimall.common.to.SkuMemberPriceTo;
import com.gulimall.common.to.SpuBoundsTo;
import com.gulimall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author kkk
 * @date 2022/7/17
 */
@FeignClient("gulimall-coupon")
public interface CouponFeignService {
    /**
     * 远程调用  保存积分信息
     *
     * @param spuBoundsTo
     * @return
     */
    @PostMapping("/coupon/spubounds/save")
    R saveBounds(@RequestBody SpuBoundsTo spuBoundsTo);

    /**
     * 远程调用 保存商品满件打折信息
     *
     * @param skuLadderTo
     * @return
     */
    @PostMapping("/coupon/skuladder/save")
    R saveSkuLadder(@RequestBody SkuLadderTo skuLadderTo);

    /**
     * 远程调用 保存商品满减信息
     *
     * @param skuFullReductionTo
     * @return
     */
    @PostMapping("/coupon/skufullreduction/save")
    R saveFullReduction(@RequestBody SkuFullReductionTo skuFullReductionTo);

    /**
     * 远程调用  批量保存用户优惠信息
     *
     * @param skuMemberPriceTos
     * @return
     */
    @PostMapping("/coupon/memberprice/batch/save")
    public R batchSaveMember(@RequestBody List<SkuMemberPriceTo> skuMemberPriceTos);
}
